# the minimum version of CMake.
cmake_minimum_required(VERSION 3.4.1)
project(libjpeg)

set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH $ORIGIN)

set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

include_directories(${NATIVERENDER_ROOT_PATH}
                    ${NATIVERENDER_ROOT_PATH}/include)

add_library(jpeg SHARED jaricom.c
                                   jcapimin.c
                                   jcapistd.c
                                   jcarith.c
                                   jccoefct.c
                                   jccolor.c
                                   jcdctmgr.c
                                   jchuff.c
                                   jcinit.c
                                   jcmainct.c
                                   jcmarker.c
                                   jcmaster.c
                                   jcomapi.c
                                   jcparam.c
                                   jcprepct.c
                                   jcsample.c
                                   jctrans.c
                                   jdapimin.c
                                   jdapistd.c
                                   jdarith.c
                                   jdatadst.c
                                   jdatasrc.c
                                   jdcoefct.c
                                   jdcolor.c
                                   jddctmgr.c
                                   jdhuff.c
                                   jdinput.c
                                   jdmainct.c
                                   jdmarker.c
                                   jdmaster.c
                                   jdmerge.c
                                   jdpostct.c
                                   jdsample.c
                                   jdtrans.c
                                   jerror.c
                                   jfdctflt.c
                                   jfdctfst.c
                                   jfdctint.c
                                   jidctflt.c
                                   jidctfst.c
                                   jidctint.c
                                   jquant1.c
                                   jquant2.c
                                   jutils.c
                                   jmemmgr.c
                                   jmemname.c)